package edu.nf.ch02.config;

import edu.nf.ch02.common.MinioFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wangl
 * @date 2025/9/4
 */
@Configuration
public class MinioConfig {

    /**
     * 装配MinioFactoryBean
     * @return
     */
    @Bean
    public MinioFactoryBean minioFactoryBean() {
        MinioFactoryBean factoryBean = new MinioFactoryBean();
        factoryBean.setHost("http://127.0.0.1:9000");
        factoryBean.setAccount("minioadmin");
        factoryBean.setPassword("minioadmin");
        factoryBean.setBucketName("myapp");
        return factoryBean;
    }
}